package com.accloud.cloudservice;

import com.accloud.service.ACException;
import com.google.gson.JsonElement;
import java.util.HashMap;
import java.util.Map;

/* access modifiers changed from: package-private */
public class SocketMessage {
    private Map<String, Object> header = new HashMap();
    private JsonElement payload;

    SocketMessage() {
    }

    /* access modifiers changed from: package-private */
    public String getName() {
        return this.header.get("X-Zc-Msg-Name").toString();
    }

    /* access modifiers changed from: package-private */
    public int getSeqId() {
        Object o = this.header.get("X-Zc-Seq-Id");
        if ((o instanceof Integer) || (o instanceof Long)) {
            return ((Long) o).intValue();
        }
        if ((o instanceof Double) || (o instanceof Float)) {
            return ((Double) o).intValue();
        }
        return -1;
    }

    /* access modifiers changed from: package-private */
    public String getSubDomain() {
        if (this.header.containsKey("X-Zc-Sub-Domain")) {
            return this.header.get("X-Zc-Sub-Domain").toString();
        }
        return null;
    }

    /* access modifiers changed from: package-private */
    public int getErrCode() {
        return ResponseError.parse(this.payload.toString()).errorCode;
    }

    /* access modifiers changed from: package-private */
    public ACException getError() {
        return ResponseError.parse(this.payload.toString()).getException();
    }

    /* access modifiers changed from: package-private */
    public String getPayload() {
        return this.payload.toString();
    }
}
